<?php
/**
 * @link http://www.yiiframework.com/
 * @copyright Copyright (c) 2008 Yii Software LLC
 * @license http://www.yiiframework.com/license/
 */

namespace app\assets;

use yii\web\AssetBundle;
use app\service\UrlService;
use yii\web\View;
/**
 * Main application asset bundle.
 *
 * @author Qiang Xue <qiang.xue@gmail.com>
 * @since 2.0
 */
class AppAsset extends AssetBundle
{
    public $basePath = '@webroot';
    public $baseUrl = '@web';
    // public $jsOptions = [
    //     'position'=>'View::POS_HEAD',
    // ];
    // public $css = [
    //     '/bootstrap/css/bootstrap.min.css',
    // ];
    // public $js = [
    //     '/jquery/jquery.min.js',
    //     '/bootstrap/css/bootstrap.min.css',  
    // ];
    // public $depends = [
    //     'yii\web\YiiAsset',
    //     'yii\bootstrap\BootstrapAsset',
    // ];


    public function registerAssetFiles($view){
        $release = "1.0";
        $this->css = [
            UrlService::BuildUrl("/bootstrap/css/bootstrap.min.css",['v'=>$release]),
            UrlService::BuildUrl('/css/app.css'),
        ];
        $this->js = [
            UrlService::BuildUrl('jquery/jquery.min.js'),
            UrlService::BuildUrl('/bootstrap/js/bootstrap.min.js'),
        ];

        parent::registerAssetFiles($view);
    }
}
